// 类似 vue中的main.js
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
// 确定路由模式：hash(HashRouter)或者history(BrowserRouter)
import { BrowserRouter } from 'react-router-dom'
// 引入Provider组件，给app的所有子组件提供数据
import { Provider } from 'react-redux'
// 引入store作为数据
import store from './store'

ReactDOM.render(
  <BrowserRouter>
    <Provider store={store}>
      <App />
    </Provider>
  </BrowserRouter>,
  document.getElementById('root')
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
